<?php /*
<script type="text/javascript">
    $(document).ready(function(){
        $("#browser")
        .bind("loaded.jstree", function (event, data) {
                alert ("Tree is loaded");
        })
        .jstree({
            core : { }
        });
    });
</script>
<div>
Index Controller
<?php echo preg_replace('/ul/', 'ul id="browser"', renderTree($this->navMenu), 1); ?>
</div>

<?php
function renderTree($tree) {
    $html = '<ul>'. "\n";
    foreach ($tree as $t) {
        $html .= "\t" . '<li id="'.$t['id'].'">' . $t['label'] . '</span>' . "\n";
        if (array_key_exists('sub', $t)) {
            $html .= "\n" . renderTree($t['sub']);
        }
    }
    $html .= "</ul>" . "\n";
    return $html;
}
?>
 */
?>
<?php //echo $this->headScript('FILE', "/js/jstree/jquery.jstree.js", 'APPEND'); ?>
